// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   GTSNullImpl.java

package com.sunwayhorizo.health.hl7.datatypes.common;

import com.sunwayhorizo.health.hl7.common.VersionInfo;
import com.sunwayhorizo.health.hl7.datatypes.BL;
import com.sunwayhorizo.health.hl7.datatypes.CS;
import com.sunwayhorizo.health.hl7.datatypes.GTS;
import com.sunwayhorizo.health.hl7.datatypes.IVL_TS;
import com.sunwayhorizo.health.hl7.datatypes.SET_TS;
import com.sunwayhorizo.health.hl7.datatypes.ST;
import com.sunwayhorizo.health.hl7.datatypes.TS;
import com.sunwayhorizo.health.hl7.datatypes.TYPE;

// Referenced classes of package oracle.apps.ctb.hl7.types.common:
//            GTSBase, ANYImpl, BLImpl, CSImpl, 
//            IVL_TSImpl, STImpl, TYPEImpl

public class GTSNullImpl extends GTSBase
{

    public static final String RCS_ID = "$Header: GTSNullImpl.java 115.14 2005/09/16 09:23:18 amchanda noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: GTSNullImpl.java 115.14 2005/09/16 09:23:18 amchanda noship $", "oracle.apps.ctb.hl7.types.common");
    private static final GTS nullNI = new GTSNullImpl(CSImpl.valueOf("NI"));
    private static final GTS nullOTH = new GTSNullImpl(CSImpl.valueOf("OTH"));
    private static final GTS nullNINF = new GTSNullImpl(CSImpl.valueOf("NINF"));
    private static final GTS nullPINF = new GTSNullImpl(CSImpl.valueOf("PINF"));
    private static final GTS nullUNK = new GTSNullImpl(CSImpl.valueOf("UNK"));
    private static final GTS nullASKU = new GTSNullImpl(CSImpl.valueOf("ASKU"));
    private static final GTS nullNAV = new GTSNullImpl(CSImpl.valueOf("NAV"));
    private static final GTS nullMSK = new GTSNullImpl(CSImpl.valueOf("MSK"));
    private static final GTS nullNA = new GTSNullImpl(CSImpl.valueOf("NA"));
    private static final GTS nullNASK = new GTSNullImpl(CSImpl.valueOf("NASK"));

    public static GTS nullGTS()
    {
        return new GTSNullImpl(null);
    }

    protected GTSNullImpl(CS cs)
    {
        super(cs);
    }

    public ST literal()
    {
        return STImpl.nullST(nullFlavor());
    }

    public TYPE dataType()
    {
        return com.sunwayhorizo.health.hl7.datatypes.common.TYPEImpl.GTS;
    }

    public BL contains(TS ts)
    {
        return BLImpl.FALSE;
    }

    public BL contains(SET_TS set_ts)
    {
        return BLImpl.FALSE;
    }

    public GTS union(GTS gts)
    {
        throw ANYImpl.newUnsupportedException("GTSNull", "union");
    }

    public IVL_TS hull()
    {
        return IVL_TSImpl.nullIVL_TS();
    }

    public IVL_TS nextTo(TS ts)
    {
        return IVL_TSImpl.nullIVL_TS();
    }

    public IVL_TS nextAfter(TS ts)
    {
        return IVL_TSImpl.nullIVL_TS();
    }

    public static GTS nullGTS(CS cs)
    {
        String s = null;
        if(cs == null || cs.literal().stringValue() == null || cs.isNull().isTrue())
            s = "NI";
        else
            s = cs.literal().stringValue();
        if(s.equals("NI"))
            return nullNI;
        if(s.equals("OTH"))
            return nullOTH;
        if(s.equals("NINF"))
            return nullNINF;
        if(s.equals("PINF"))
            return nullPINF;
        if(s.equals("UNK"))
            return nullUNK;
        if(s.equals("ASKU"))
            return nullASKU;
        if(s.equals("NAV"))
            return nullNAV;
        if(s.equals("MSK"))
            return nullMSK;
        if(s.equals("NA"))
            return nullNA;
        if(s.equals("NASK"))
            return nullNASK;
        else
            return nullNI;
    }

}
